package org.rency.crawler.scheduler.support;

import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;
import org.springframework.stereotype.Component;

/**
 * 描述: ${TODO}<br>
 * 最近修改时间:2018/2/9 18:23<br>
 *
 * @author CaiyuRen
 * @version V1.0
 * @since 2018/2/9 18:23
 */
@Component("listenerRejectedExecutionHandler")
public class ListenerRejectedExecutionHandler implements RejectedExecutionHandler {

  @Override
  public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
    executor.submit(r);
  }
}
